<%@ page contentType="text/html; charset=utf-8"%>
<%@ page import="Artist.*, www.utility.*"%>
<%
String root = (String)request.getAttribute("root");
ArtistDTO dto = (ArtistDTO)request.getAttribute("read"); 


%>
<SCRIPT src = "<%=root%>/js/Artist.js"></SCRIPT>

<form id="inArtistFrm" 
      name="inArtistFrm" 
      method="post" action="<%=root %>/artist/updateArtistProc.do"
      onSubmit="return checkInputFrom(this)"
      enctype="multipart/form-data" >

<input type="hidden" name="art_no" value="<%=dto.getArtist_no() %>">
<input type="hidden" name="old_imagefile" value="<%=dto.getArtist_imagefile() %>">
<input type="hidden" name="old_imagesize" value="<%=dto.getArtist_imagesize() %>">

<table>
    <tr>
        <td>아티스트 이름 * </td>
        <td> <input type="text" name="ArtName" value="<%=dto.getArtist_name()%>"/></td>
    </tr>
    <tr>
        <td>아티스트 타입 * </td>
        <td> 
            <input type="radio" name="ArtistType" value="솔로" <%if(dto.getArtist_type().equals("솔로")){out.print("checked='checked'");} %>/>솔로
            <input type="radio" name="ArtistType" value="그룹" <%if(dto.getArtist_type().equals("그룹")){out.print("checked='checked'");} %>/>그룹
            <input type="radio" name="ArtistType" value="유닛" <%if(dto.getArtist_type().equals("유닛")){out.print("checked='checked'");} %>/>유닛
        </td>
    </tr>
    <tr>
        <td>아티스트 국적 * </td>
        <td> 
            <input type="radio" name="ArtistCountry" value="국내" <%if(dto.getArtist_country().equals("국내")){out.print("checked='checked'");} %>/>국내
            <input type="radio" name="ArtistCountry" value="국외" <%if(dto.getArtist_country().equals("국외")){out.print("checked='checked'");} %>/>국외
        </td>
    </tr>
    <tr>
        <td>아티스트 이미지 </td>
        <td>기존에 등록된 파일명 : <%=Utility.checkNull(dto.getArtist_imagefile()) %> <br>
            <input type="file" name="ArtistImageFile" id="ArtistImageFile"/>
         </td>
    </tr>
    <tr>
        <td><input type="submit" value="수정"></td>
        <td><input type="reset" value="초기화"></td>
    </tr>
</table>
</form>